\hypertarget{classSerial}{\section{\-Serial \-Class \-Reference}
\label{classSerial}\index{\-Serial@{\-Serial}}
}


\hyperlink{classSerial}{\-Serial} is the implementation for setting up and maintaining the serial communication. class responsible for the serial communication with the robot.  




{\ttfamily \#include $<$\-Serial.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classSerial_a3667c3137f2df94716b5193f9fb736ab}{\-Serial} ()
\item 
\hyperlink{classSerial_ad1752229323debe90401633e7e814e4f}{\-Serial} (string path, double baud, int databits, int stopbits)
\item 
\hyperlink{classSerial_a5b32c394c0ff923a4ef1c13cfb20a6ba}{$\sim$\-Serial} ()
\item 
int \hyperlink{classSerial_af1957c23ed00561f3cab85113348918a}{init} (void)
\item 
int \hyperlink{classSerial_ab7edfef5d488fa4ec4f0257adcf3b3f4}{s\-Write} (string)
\item 
int \hyperlink{classSerial_a06c060d85f47affb60189998e94f9dfd}{s\-Read} (char $\ast$)
\item 
double \hyperlink{classSerial_a8362c2dc601b4006eb2b7e1549d50415}{getbaud} (void)
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\hyperlink{classSerial}{\-Serial} is the implementation for setting up and maintaining the serial communication. class responsible for the serial communication with the robot. 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classSerial_a3667c3137f2df94716b5193f9fb736ab}{\index{\-Serial@{\-Serial}!\-Serial@{\-Serial}}
\index{\-Serial@{\-Serial}!Serial@{\-Serial}}
\subsubsection[{\-Serial}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Serial\-::\-Serial} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classSerial_a3667c3137f2df94716b5193f9fb736ab}
\-Constructor \hypertarget{classSerial_ad1752229323debe90401633e7e814e4f}{\index{\-Serial@{\-Serial}!\-Serial@{\-Serial}}
\index{\-Serial@{\-Serial}!Serial@{\-Serial}}
\subsubsection[{\-Serial}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Serial\-::\-Serial} (
\begin{DoxyParamCaption}
\item[{string}]{path, }
\item[{double}]{baud, }
\item[{int}]{databits, }
\item[{int}]{stopbits}
\end{DoxyParamCaption}
)}}\label{classSerial_ad1752229323debe90401633e7e814e4f}
\-Constructor 
\begin{DoxyParams}{\-Parameters}
{\em baud} & \-Integer that defines the baudrate \\
\hline
{\em databits} & \-Integer that defines the number of databits \\
\hline
{\em stopbits} & \-Integer that defines the number of stopbits \\
\hline
\end{DoxyParams}
\hypertarget{classSerial_a5b32c394c0ff923a4ef1c13cfb20a6ba}{\index{\-Serial@{\-Serial}!$\sim$\-Serial@{$\sim$\-Serial}}
\index{$\sim$\-Serial@{$\sim$\-Serial}!Serial@{\-Serial}}
\subsubsection[{$\sim$\-Serial}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Serial\-::$\sim$\-Serial} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classSerial_a5b32c394c0ff923a4ef1c13cfb20a6ba}
\-Destructor 

\subsection{\-Member \-Function \-Documentation}
\hypertarget{classSerial_a8362c2dc601b4006eb2b7e1549d50415}{\index{\-Serial@{\-Serial}!getbaud@{getbaud}}
\index{getbaud@{getbaud}!Serial@{\-Serial}}
\subsubsection[{getbaud}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf \-Serial\-::getbaud} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{classSerial_a8362c2dc601b4006eb2b7e1549d50415}
\-Function for retrieving the baudrate of the serial connection \begin{DoxyReturn}{\-Returns}
double \-Double with the value of the baudrate 
\end{DoxyReturn}
\hypertarget{classSerial_af1957c23ed00561f3cab85113348918a}{\index{\-Serial@{\-Serial}!init@{init}}
\index{init@{init}!Serial@{\-Serial}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Serial\-::init} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{classSerial_af1957c23ed00561f3cab85113348918a}
\-Function for initialising the serial connection \begin{DoxyReturn}{\-Returns}
\-Gives 0 if init succeeded, gives 1 if failed 
\end{DoxyReturn}
\hypertarget{classSerial_a06c060d85f47affb60189998e94f9dfd}{\index{\-Serial@{\-Serial}!s\-Read@{s\-Read}}
\index{s\-Read@{s\-Read}!Serial@{\-Serial}}
\subsubsection[{s\-Read}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Serial\-::s\-Read} (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{}
\end{DoxyParamCaption}
)}}\label{classSerial_a06c060d85f47affb60189998e94f9dfd}
\-Function for reading data from the serial port 
\begin{DoxyParams}{\-Parameters}
{\em \-String} & that does something \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
int \-I\-Nteger that returns the number of read bytes 
\end{DoxyReturn}
\hypertarget{classSerial_ab7edfef5d488fa4ec4f0257adcf3b3f4}{\index{\-Serial@{\-Serial}!s\-Write@{s\-Write}}
\index{s\-Write@{s\-Write}!Serial@{\-Serial}}
\subsubsection[{s\-Write}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Serial\-::s\-Write} (
\begin{DoxyParamCaption}
\item[{string}]{}
\end{DoxyParamCaption}
)}}\label{classSerial_ab7edfef5d488fa4ec4f0257adcf3b3f4}
\-Function for writing data to the serial port 
\begin{DoxyParams}{\-Parameters}
{\em \-String} & that will be written to the port \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
int \-Integer gives the number of sent bytes 
\end{DoxyReturn}


\-The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
\-Serial.\-h\end{DoxyCompactItemize}
